package com.ssy.bus.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author ssy
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("bus_pur_order")
public class Order implements Serializable {
    private static final long serialVersionUID = 7264089162345973892L;

    /**
     * 药品ID
     */
    private Integer drugId;

    /**
     * 批发价
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal tradePrice;

    /**
     * 批发额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal wholesaleAmount;

    private String purId;

    /**
     * 数量
     */
    private Integer number;

    /**
     * 规格
     */
    private String specifications;

    /**
     * 批次号
     */
    private String batchNumber;

    @TableField(exist = false)
    private Integer[] ids;

    @TableField(exist = false)
    private String drugName;

    @TableField(exist = false)
    private String productionName;

    @TableField(exist = false)
    private String company;

    /**
     * 总批发额
     */
    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal sumWholesaleAmount;


}
